package cn.edu.wynu;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SetterInjectionMain {
    public static void main(String[] args) {
        // 加载 Spring 配置文件
        ApplicationContext context = new ClassPathXmlApplicationContext("setter-injection.xml");

        // 获取 Dog 对象
        Dog dog = (Dog) context.getBean("dog");

        // 输出 Dog 对象的内容
        System.out.println(dog);
    }
}
